﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Show.aspx.cs" Inherits="socialnexus.admin.Users.Show"
MasterPageFile="~/masters/Admin.Master" %>

<asp:Content ContentPlaceHolderID="body" runat="server">

<h1>
    User Details
    <asp:HyperLink runat="server" NavigateUrl="~/admin/Users/Edit.aspx" ID="hlEdit" Text="edit"
        EnableViewState="false" />
</h1>

<div class="badge">
    <asp:Image runat="server" ID="imgPictureURL" />
    <asp:Label runat="server" ID="lblFirstName"  />
    <asp:Label runat="server" ID="lblLastName" />
</div>

<div class="clear"></div>

<p>
    Account Status: <asp:Label runat="server" ID="lblActive" Font-Bold="true" /> 
    <asp:HyperLink runat="server" ID="hlActivateSuspend" />
</p>


<h2>Friends</h2>

<p><asp:HyperLink ID="hlAddFriend" NavigateUrl="~/admin/Users/Friends/Add.aspx" runat="server"
    Text="Add a Friend" EnableViewState="false" /></p>

<table class="genericTable clear" cellpadding="0" cellspacing="1" border="0">
<asp:Repeater ID="rptrUsers" runat="server">
    <HeaderTemplate>
        <tr>
            <th>&nbsp;</th>
            <th>First Name</th>
            <th>Last Name</th>
            <th class="actions">Actions</th>
        </tr>
    </HeaderTemplate>
    <ItemTemplate>
        <tr>
        <td>
            <asp:HyperLink ID="HyperLink2" NavigateUrl='<%# "Show.aspx?UserId="+DataBinder.Eval(Container.DataItem, "SiteUserId").ToString() %>'
                runat="server">
                <asp:Image runat="server" ID="PictureURL" AlternateText="Picture"
                    ImageUrl='<%# DataBinder.Eval(Container.DataItem, "PictureURL").ToString().Trim() %>' />
            </asp:HyperLink>
        </td>
        <td><asp:Label runat="server" ID="FirstName" 
            Text='<%# DataBinder.Eval(Container.DataItem, "FirstName") %>' /></td>
        <td><asp:Label runat="server" ID="LastName" 
            Text='<%# DataBinder.Eval(Container.DataItem, "LastName") %>' /></td>
        <td><asp:HyperLink NavigateUrl='<%# "Friends/Remove.aspx?FriendId="+DataBinder.Eval(Container.DataItem, "SiteUserId").ToString()
        + "&amp;UserId=" + Server.HtmlEncode(Request.QueryString["UserId"]).ToString() %>'
                runat="server" Text="Remove" /></td>
        </tr>
    </ItemTemplate>
</asp:Repeater>
</table>


</asp:Content>